<?
##########################################################################
#		DOCUMENTATION
##########################################################################
# Logout script. Start the session and handle the cookies. When everything is
# set returns to view.php
#
# © LiberLab group, 2011
##########################################################################

session_start();

require_once("generalFunctions.php");
require_once("dynamic/base/root.php");

class Logout extends Root{
	public function __construct() {
		parent::__construct("logout");
	}
	
	public function main(){
		# clean the SESSION
		$this->delSession("nickname");
		$this->delSession("password");

		$this->delCookie("nickname");
		$this->delCookie("password");

		$this->redirect("view.php");
	}

	public function __destruct() {
		parent::__destruct();
	}
};

$logout = new Logout();
$logout->main();

?>
